package com.iss.ljx.duty.repository;

import com.iss.ljx.duty.entity.SearchDutyEntity;
import com.iss.ljx.mybatis.entity.PtDutyEntity;
import com.iss.ljx.mybatis.flexigrid.PagingBean;
import com.iss.ljx.mybatis.ztree.ZtreeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface  DutyDao {
    List<PtDutyEntity> queryDutyListPage(@Param("search") SearchDutyEntity search,@Param("paging") PagingBean paging);
    List<PtDutyEntity> queryDutyListPageById(@Param("organId") String organId,@Param("paging") PagingBean paging);

    Integer queryDutyTotal(@Param("search")SearchDutyEntity search);
    Integer queryDutyTotalById(@Param("organId")String organId);

    List<ZtreeEntity> queryMenuTree();

    PtDutyEntity getDutyInfoByOrganId(@Param("organId") String organId);

    String getRoleIdByName(@Param("roleName") String roleName);
    String getOrganIdByName(@Param("organName") String organName);
    void dutyAdd(@Param("ptDutyEntity") PtDutyEntity ptDutyEntity);
    void dutyUpdate(@Param("ptDutyEntity") PtDutyEntity ptDutyEntity);
    void dutyDelete(@Param("dutyId") String dutyId);
}
